<template>
    <div class="forms">
        <workInfo v-if="wwccount === 5"></workInfo>
        <personInformation v-else-if="wwccount === 4"></personInformation>
        <Contacts v-else-if="wwccount === 3"></Contacts>
        <Bank v-else-if="wwccount === 2"></Bank>
        <huoti v-else-if="wwccount === 1">活体校验</huoti>
    </div>
</template>
<script>
import workInfo from './workInfo.vue'
import personInformation from './PersonInformation.vue'
import Contacts from './Contacts'
import Bank from './Bank'
import smrz from '../smrz'
import huoti from './huoti'

export default {
    components: { workInfo, personInformation, Contacts, Bank, smrz, huoti },
    data() {
        return {
            //未完成表单的剩余数量
            wwccount: 5
        }
    },
    created() {
        //获取未完成的表单
        this.$store.dispatch('weiwancehngform')
        this.wwccount = this.$store.state.formData.length
        console.log('表单数量', this.wwccount)
    },
    updated() {
        console.log('更新声明周期触发')
        this.wwccount = this.$store.state.formData.length
    },
}
</script>